package com.example.flower_shop.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.flower_shop.entity.StoreOrder;
import com.example.flower_shop.vo.order.AdmOrderPageReq;
import com.example.flower_shop.vo.order.AdmOrderPageResp;
import com.example.flower_shop.vo.order.UsrOrderPageReq;
import com.example.flower_shop.vo.order.UsrOrderPageResp;
import com.github.yulichang.base.MPJBaseMapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author zbxComputer
 * @description 针对表【sys_store_order(订单表)】的数据库操作Mapper
 * @createDate 2024-11-21 12:49:00
 * @Entity com.example.flower_shop.entity.StoreOrder
 */
public interface StoreOrderMapper extends MPJBaseMapper<StoreOrder> {

    boolean updateOrderStatus(@Param("orderId") Long orderId
            , @Param("source") Integer source
            , @Param("target") Integer target);

    IPage<UsrOrderPageResp> usrPage(Page<UsrOrderPageResp> page,
                                    @Param("req") UsrOrderPageReq req,
                                    @Param("userId") Long userId);

    Page<AdmOrderPageResp> admPage(Page<AdmOrderPageResp> page, @Param("req") AdmOrderPageReq req);
}




